/*
 * File: SOCE.h
 *
 * Code generated for Simulink model 'SOCE'.
 *
 * Model version                  : 3.289
 * Simulink Coder version         : 9.4 (R2020b) 29-Jul-2020
 * C/C++ source code generated on : Sun Dec 31 11:58:56 2023
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: NXP->Cortex-M4
 * Code generation objective: MISRA C:2012 guidelines
 * Validation result: Not run
 */

#ifndef RTW_HEADER_SOCE_h_
#define RTW_HEADER_SOCE_h_
#include <stddef.h>
#ifndef SOCE_COMMON_INCLUDES_
#define SOCE_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif                                 /* SOCE_COMMON_INCLUDES_ */

#include "SOCE_types.h"

/* Child system includes */
#include "DelayTimesSe.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
#define rtmGetErrorStatus(rtm)         ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
#define rtmSetErrorStatus(rtm, val)    ((rtm)->errorStatus = (val))
#endif

/* Block signals (default storage) */
typedef struct
{
    uint16_T DymSOC_n;                 /* '<S5>/socUpK6' */
    uint16_T soc;                      /* '<S5>/RealSOC' */
    uint16_T realSOC;                  /* '<S5>/DeltaSOC' */
    uint16_T correctSOC;               /* '<S5>/DeltaSOC' */
    uint16_T soc_i;                    /* '<S5>/CorrectSOC' */
    uint8_T DymCorrSts;                /* '<S5>/socUpK6' */
    uint8_T DK;                        /* '<S5>/socUpK6' */
    uint8_T DymUpdate;                 /* '<S5>/socUpK6' */
    uint8_T update;                    /* '<S5>/DeltaSOC' */
    boolean_T flg;                     /* '<S5>/StaticCurr' */
    B_DelayTimesSe_T DelayTimesforS2;  /* '<S5>/DelayTimesforS2' */
}
B_SOCE_T;

/* Block states (default storage) for system '<Root>' */
typedef struct
{
    real_T corrFlg;                    /* '<S5>/DeltaSOC' */
    uint32_T Delay1_DSTATE;            /* '<S5>/Delay1' */
    int32_T total;                     /* '<S27>/SmallCurrDeltaAH' */
    uint32_T cnt;                      /* '<S5>/StaticCurr' */
    uint16_T oldsoc3;                  /* '<S5>/socUpK7' */
    uint8_T Delay_DSTATE;              /* '<S5>/Delay' */
    uint8_T flg3;                      /* '<S5>/socUpK7' */
    uint8_T is_c7_SOCE;                /* '<S5>/socUpK' */
    uint8_T socChgStep;                /* '<S5>/socUpK' */
    uint8_T is_active_c5_SOCE;         /* '<S5>/RealSOC' */
    uint8_T is_c5_SOCE;                /* '<S5>/RealSOC' */
    uint8_T is_c4_SOCE;                /* '<S5>/DeltaSOC' */
    uint8_T is_Startup;                /* '<S5>/DeltaSOC' */
    uint8_T is_active_c1_SOCE;         /* '<S5>/CorrectSOC' */
    uint8_T is_c1_SOCE;                /* '<S5>/CorrectSOC' */
    boolean_T finish;                  /* '<S5>/DeltaSOC' */
    DW_DelayTimesSe_T DelayTimesforS2; /* '<S5>/DelayTimesforS2' */
}
DW_SOCE_T;

/* Invariant block signals (default storage) */
typedef struct
{
    const uint16_T Constant1;          /* '<S5>/Constant1' */
}
ConstB_SOCE_T;

/* Real-time Model Data Structure */
struct tag_RTM_SOCE_T
{
    const char_T * volatile errorStatus;
};

/* Block signals (default storage) */
extern B_SOCE_T SOCE_B;

/* Block states (default storage) */
extern DW_SOCE_T SOCE_DW;
extern const ConstB_SOCE_T SOCE_ConstB;/* constant block i/o */

/* Model entry point functions */
extern void SOCE_initialize(void);

/* Exported entry point function */
extern void TASK_SOCESignal(void);

/* Real-time Model object */
extern RT_MODEL_SOCE_T *const SOCE_M;

/* Exported data declaration */

/* Declaration for custom storage class: ExportToFile */
extern uint8_T currv_fact_k;           /* '<S5>/Delay' */
extern uint32_T soce_ah_Mas;           /* '<S5>/CorrectSOC' */
extern uint32_T soce_ah_RealMas;       /* '<S5>/RealSOC' */
extern uint32_T soce_mas_nomAh;        /* '<S29>/Product' */
extern uint16_T soce_pct_DispSOC;      /* '<S5>/OCVTableHi2' */
extern uint8_T soce_pct_DymCorrSts;    /* '<S5>/Delay5' */
extern uint16_T soce_pct_RealSOC;      /* '<S5>/Saturation2' */
extern uint16_T soce_pct_SOC;          /* '<S5>/Saturation1' */
extern uint16_T soce_pct_deltaSoc;     /* '<S5>/Constant1' */

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'SOCE'
 * '<S1>'   : 'SOCE/DocBlock'
 * '<S2>'   : 'SOCE/Interface'
 * '<S3>'   : 'SOCE/LoadEnvironment1'
 * '<S4>'   : 'SOCE/Model Info'
 * '<S5>'   : 'SOCE/Interface/SOCE'
 * '<S6>'   : 'SOCE/Interface/SOCE/BatCurrConverter'
 * '<S7>'   : 'SOCE/Interface/SOCE/CalcDeltaSoc1'
 * '<S8>'   : 'SOCE/Interface/SOCE/Compare To Constant12'
 * '<S9>'   : 'SOCE/Interface/SOCE/Compare To Constant17'
 * '<S10>'  : 'SOCE/Interface/SOCE/Compare To Constant3'
 * '<S11>'  : 'SOCE/Interface/SOCE/Compare To Constant32'
 * '<S12>'  : 'SOCE/Interface/SOCE/Compare To Constant34'
 * '<S13>'  : 'SOCE/Interface/SOCE/Compare To Constant35'
 * '<S14>'  : 'SOCE/Interface/SOCE/Compare To Constant6'
 * '<S15>'  : 'SOCE/Interface/SOCE/Compare To Constant62'
 * '<S16>'  : 'SOCE/Interface/SOCE/Compare To Constant63'
 * '<S17>'  : 'SOCE/Interface/SOCE/Compare To Constant65'
 * '<S18>'  : 'SOCE/Interface/SOCE/Compare To Constant67'
 * '<S19>'  : 'SOCE/Interface/SOCE/Compare To Constant8'
 * '<S20>'  : 'SOCE/Interface/SOCE/Compare To Constant9'
 * '<S21>'  : 'SOCE/Interface/SOCE/CorrectSOC'
 * '<S22>'  : 'SOCE/Interface/SOCE/DelayTimesforS2'
 * '<S23>'  : 'SOCE/Interface/SOCE/DeltaSOC'
 * '<S24>'  : 'SOCE/Interface/SOCE/RealSOC'
 * '<S25>'  : 'SOCE/Interface/SOCE/StaticCurr'
 * '<S26>'  : 'SOCE/Interface/SOCE/Subsystem'
 * '<S27>'  : 'SOCE/Interface/SOCE/Subsystem1'
 * '<S28>'  : 'SOCE/Interface/SOCE/Subsystem2'
 * '<S29>'  : 'SOCE/Interface/SOCE/Subsystem4'
 * '<S30>'  : 'SOCE/Interface/SOCE/socUpK'
 * '<S31>'  : 'SOCE/Interface/SOCE/socUpK2'
 * '<S32>'  : 'SOCE/Interface/SOCE/socUpK3'
 * '<S33>'  : 'SOCE/Interface/SOCE/socUpK6'
 * '<S34>'  : 'SOCE/Interface/SOCE/socUpK7'
 * '<S35>'  : 'SOCE/Interface/SOCE/CalcDeltaSoc1/Compare To Constant1'
 * '<S36>'  : 'SOCE/Interface/SOCE/CalcDeltaSoc1/Compare To Constant21'
 * '<S37>'  : 'SOCE/Interface/SOCE/CalcDeltaSoc1/Compare To Zero1'
 * '<S38>'  : 'SOCE/Interface/SOCE/CalcDeltaSoc1/Compare To Zero2'
 * '<S39>'  : 'SOCE/Interface/SOCE/DelayTimesforS2/Compare To Constant1'
 * '<S40>'  : 'SOCE/Interface/SOCE/Subsystem/Compare To Constant2'
 * '<S41>'  : 'SOCE/Interface/SOCE/Subsystem1/SmallCurrDeltaAH'
 */

/*-
 * Requirements for '<Root>': SOCE
 */
#endif                                 /* RTW_HEADER_SOCE_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
